﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class UserControl_users_manager : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!clsUsers.CheckLoginUser_Client())
        {
            Response.Redirect("/");
        }
        loadHolder();
    }

    /// <summary>
    /// Load usercontrol
    /// Author: ThuanNH
    /// Create: 25/07/2013
    /// </summary>
    private void loadHolder()
    {
        string strUserControlName = clsCommon.fncGetRoute(this.Page, "param1");        
        clsCommon.fncLoadUserControl(plhContent, this.Page, "UserControl/UsersManager/", strUserControlName, "index");
    }

    /// <summary>
    /// Sự kiện tẩu thoát.
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void lbtLogOut_Click(object sender, EventArgs e)
    {
        clsUsers.LogOutUsers();
        Response.Redirect("/");
    }

}